<?php

namespace App\EventSubscriber;

use App\Event\UserEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class UserSubscriber implements EventSubscriberInterface
{

    public static function getSubscribedEvents()
    {
        return [
            UserEvent::USER_REG => 'onUserReg',
            UserEvent::USER_DELETE => 'onUserDelete'
        ];
    }
    public function onUserReg(UserEvent $event)
    {
        $user = $event->getUser();
//        dump("onUserReg");
    }
    public function onUserDelete(UserEvent $event)
    {
        $user = $event->getUser();
//        dump("onUserDelete");
    }

}
